name: Tests workflow

on: pull_request

jobs:
  build:
    name: Run tests

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: '16.12.0'

      - uses: supercharge/mongodb-github-action@1.3.0
        with:
          mongodb-version: '5.0.3'

      - run: npm install

      - run: npm test --silent
        env:
          CI: true
